<div>
    <p>你好，<span id='nickName'></span></p>
    <div id="introduce"></div>
</div>　
<script>
    var vm = {};

    var data = {
        nickName: "张无忌",
        introduce: "九阳神功护体"
    }

    Object.keys(data).forEach(function (key) {
        Object.defineProperty(vm, key, {
            emumerable: false,
            configurable: true,
            get: function () {
                // return self.data[key];
                return document.getElementById(key).innerHTML;
            },
            set: function (newVal) {
                // self.data[key] = newVal;
                document.getElementById(key).innerHTML = newVal;
            }
        })
    })

    Object.keys(data).forEach(function(key){
        vm[key] = data[key]
    })
    

</script>